package com.nobuyme.box.util;

import android.os.Handler;
import android.os.Message;
import android.util.Log;

import static android.content.ContentValues.TAG;
import static android_serialport_api.SerialPortController.SERIAL_PORT_RECEIVE_DATA;
import static android_serialport_api.SerialPortController.SERIAL_PORT_WRITE_DATA_NEW_BYTES;

/**
 * Created by Yong.
 * E-mail：775811790@qq.com
 * 2017/8/17
 */
class  RevHandler extends Handler{
    @Override
    public void handleMessage(Message msg) {
        super.handleMessage(msg);

        switch (msg.what){
            case SERIAL_PORT_RECEIVE_DATA:
                int number = msg.arg1;
                byte[] buffer = (byte[]) msg.obj;
                Log.e(TAG, "handleMessage: "+new String(buffer));
                break;
            case SERIAL_PORT_WRITE_DATA_NEW_BYTES:
                break;
        }

    }
     }

